#include <iostream>
using namespace std;
class Point
{
public:
    int x;
    int y;
    Point(int x, int y) : x{x}, y{y}
    {
    }
    // 函数对象
    int operator()()
    {
        return x * y;
    }
    // 重载operator()带参数
    int operator()(int num)
    {
        return x * y * num;
    }
};

int main()
{
    Point p1{1, 3};
    int info = p1();
    cout << info << endl;
    int info2 = p1(3);
    cout << info2 << endl;
    return 0;
}